home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / cd-sup / cdrom / masteriso2-demo / install-masteriso_demo < prev    next >
Text File  |  1999-01-01  |  5KB  |  222 lines

  1. ;$VER: MasterISO_Demo v2.0 (13.11.97) 
  2. ;installer routine Copyright ©1994-1997 Asimware Innovations Inc.
  3.  
  4. (onerror (makeassign "MasterISOInst") )
  5.  
  6. (set #wbversion (getversion "libs:version.library"))
  7. (set #wbversion (/ #wbversion 65536) )
  8.  
  9. (set @default-dest "Work:")
  10.  
  11. (set #theirlevel @user-level )
  12.  
  13. (set #English 0)
  14.  
  15. ;*****
  16. ; set the language we will be using
  17. ;
  18. (if (= @language "english") 
  19.     (set #our_language #English) 
  20. )
  21.  
  22.  
  23.  
  24. ;****************************
  25. ; set English language strings
  26. (if (= #our_language #English) (
  27. (set #text_needwb_2             (cat "\n\nAmigaDOS 2.0 or higher is required for MasterISO_Demo v2.x"
  28.                                      "\n\nAn upgrade will be needed for your Amiga."
  29.                                      "\n\nYou are currently running version " #wbversion "."
  30. ))
  31.  
  32.  
  33. (set #text_abort1                "\n\nApproximately ")
  34. (set #text_abort2                "K of disk space is needed on your SYS: volume.\n\nYou only have ")
  35. (set #text_abort3                "K free.\n\nDelete or transfer some files from the SYS: volume and try again.")
  36.  
  37.  
  38. (set #tp_ask_iso                 "Specify where the MasterISO_Demo directory will be created:" )
  39. (set #th_ask_iso                 "A drawer called MasterISO_Demo will be created in this specified directory." )
  40.  
  41. (set #tp_create_iso            "Creating the MasterISO_Demo: directory..." )
  42. (set #th_create_iso             "This will create the specified directory for the program." )
  43.  
  44. (set #tp_ask_installiso     "\n\nShould MasterISO_Demo be installed?" )
  45. (set #th_ask_installiso_1     "\n\nThis will copy over the MasterISO_Demo program to the ")
  46. (set #th_ask_installiso_2     " directory\n\nIf you do not wish the MasterISO_Demo program to be transferred to your system, skip this step.\n" )
  47.  
  48. (set #tp_copying_iso_1        "\n\nCopying the MasterISO_Demo program to the " )
  49. (set #tp_copying_iso_2        " directory.\n" )
  50. (set #th_copying_iso_1        "\n\nThis will copy over the MasterISO_Demo program to your")
  51. (set #th_copying_iso_2        " directory.\n" )
  52.  
  53. (set #tp_make_projects         "Creating the MasterISO_Demo:Projects directory..." )
  54. (set #th_make_projects         "This will create a sub-directory which will be used to store saved projects.")
  55.  
  56. (set #tp_copying_addendum    "\n\nCopying information files to the MasterISO_Demo:Information directory.\n" )
  57. (set #th_copying_addendum    "\n\nThis will copy over any information text files to the MasterISO_Demo:Information directory.\n" )
  58.  
  59. (set #tp_startup                 "Inserting assignment command into the startup-sequence:\n\n" )
  60. (set #th_startup                 (cat "Assignment commands are being inserted into your "
  61.                                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
  62.                                     "allow MasterISO_Demo to find the needed files.") )
  63. ))
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ;****************************
  71. ;  Need WB 2.0 or higher.
  72. (if (< #wbversion 37)
  73.     (abort #text_needwb_2)
  74. )
  75.  
  76.  
  77.  
  78. ;****************************
  79. ;  Since we are installing from a drawer, not a disk, just lock
  80. ;  the current directory
  81. (makeassign "MasterISOInst" "" )
  82.  
  83.  
  84.  
  85.  
  86. ;****************************
  87. ; compute our space required
  88. (set #installsize 0)
  89. (set #installsize (+ #installsize (getsize "MasterISOInst:MasterISO") ))
  90.  
  91.  
  92.  
  93.  
  94.  
  95. ;****************************
  96. ;  ask for MasterISO
  97. (user 2)
  98. (set #MasterISODir
  99.     (askdir
  100.         (prompt #tp_ask_iso )
  101.         (help #th_ask_iso)
  102.         (default @default-dest)
  103.         (newpath)
  104.     )
  105. )
  106. (user #theirlevel)
  107.  
  108.  
  109.  
  110. ;****************************
  111. ; make sure there is enough space 
  112.  
  113. (if (< (getdiskspace #MasterISODir) #installsize)
  114.     (abort  #text_abort1 (/ #installsize 1024) #text_abort2 (/ (getdiskspace "SYS:") 1024)    #text_abort3 )
  115. )
  116.  
  117.  
  118. (set #MasterISODir (tackon #MasterISODir "MasterISO_Demo"))
  119. (set @default-dest #MasterISODir)
  120.  
  121.  
  122.  
  123.  
  124. ;****************************
  125. ;  create directory if it doesn't exist
  126. (if (not (exists #MasterISODir (noreq)))
  127.     (makedir #MasterISODir
  128.         (prompt #tp_create_iso)
  129.         (help #th_create_iso)
  130.         (infos)
  131.         )
  132. )
  133. (makeassign "MasterISODest" #MasterISODir)
  134.  
  135.  
  136.  
  137. ;****************************
  138. ;  Install MasterISO?
  139. (set #instMasterISO
  140.     (askbool
  141.         (prompt #tp_ask_installiso)
  142.         (help #th_ask_installiso_1 #MasterISODir #th_ask_installiso_2 )
  143.         (default 1)
  144.     )
  145. )
  146.  
  147. (if #instMasterISO
  148.     ((protect "MasterISODest:MasterISO" "rwed" )
  149.     (protect "MasterISODest:MasterISO.info" "rwed" )
  150.  
  151.  
  152.  
  153.  
  154. ;***************************************************
  155. ; copy over main program 
  156.     (run "MasterISOInst:c/lx e MasterISOInst:MasterISO.lha MasterISODest:"
  157.         (prompt #tp_copying_iso_1 #MasterISODir #tp_copying_iso_2 )
  158.         (confirm)
  159.         (help  #th_copying_iso_1 #MasterISODir #th_copying_iso_2 )
  160.     )
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169. ;***************************************************
  170. ; make Projects directory
  171.     (set #temp "MasterISODest:Projects")
  172.     (if (not (exists #temp (noreq)))
  173.         (makedir #temp
  174.             (prompt #tp_make_projects)
  175.             (help #th_make_projects )
  176.             (infos)
  177.             )
  178.     )
  179.  
  180.  
  181.  
  182.     
  183.  
  184. ;***************************************************
  185. ; and copy over any files that may be present
  186.     (copyfiles
  187.         (prompt #tp_copying_addendum)
  188.         (source "MasterISOInst:Information")
  189.         (dest "MasterISODest:")
  190.         (infos)
  191.         (pattern "#?.txt")
  192.         (help  #th_copying_addendum)
  193.         (confirm)
  194.     )
  195.     
  196.  
  197.  
  198.  
  199.  
  200. ;***************************************************
  201. ; set assignments 
  202.  
  203.     (makeassign "MasterISO" #MasterISODir)
  204.  
  205.     (protect "S:User-Startup" "rwed" )
  206.     (protect "S:Startup-Sequence" "rwed" )
  207.     (set #assign_cmd (cat "assign MasterISO: \"" #MasterISODir "\"\n"))
  208.  
  209.     (startup "MasterISO"
  210.         (command #assign_cmd)
  211.         (prompt (cat #tp_startup #assign_cmd))
  212.         (help #th_startup)
  213.     )
  214. ))
  215.  
  216.  
  217.  
  218.  
  219.  
  220.     
  221. (makeassign "MasterISOInst")
  222.